<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var a = 0
        // 递归函数:函数内部自己调用自己，这个函数就是递归函数
        function fn() {
            // a == 6 ? return : a++
            console.log('我要打印6句话')
            if(a == 6) {
                return
            }
            a++
            fn()
        }
        fn()
    </script>
</head>

<body>

</body>

</html>